import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { SalaryRoutingModule } from "./salary-routing.module";
import {
    BsDatepickerConfig,
    BsDaterangepickerConfig,
    BsLocaleService,
    ModalModule,
    TabsModule,
    TooltipModule,
    PopoverModule,
    BsDropdownModule,
    BsDatepickerModule,
} from "ngx-bootstrap";
import { NgxBootstrapDatePickerConfigService } from "assets/ngx-bootstrap/ngx-bootstrap-datepicker-config.service";
import { MySalaryComponent } from "./my-salary/my-salary.component";
import { TableModule } from "primeng/table";
import { SalaryManageComponent } from "./slary-manage/salary-manage.component";
import {
    AutoCompleteModule,
    EditorModule,
    FileUploadModule as PrimeNgFileUploadModule,
    InputMaskModule,
    PaginatorModule,
} from "primeng/primeng";

@NgModule({
    declarations: [MySalaryComponent, SalaryManageComponent],
    imports: [
        CommonModule,
        SalaryRoutingModule,
        TableModule,
        PrimeNgFileUploadModule,
        ModalModule.forRoot(),
        TabsModule.forRoot(),
        TooltipModule.forRoot(),
        PopoverModule.forRoot(),
        BsDropdownModule.forRoot(),
        BsDatepickerModule.forRoot()
    ],
    providers: [
        {
            provide: BsDatepickerConfig,
            useFactory: NgxBootstrapDatePickerConfigService.getDatepickerConfig,
        },
        {
            provide: BsDaterangepickerConfig,
            useFactory:
                NgxBootstrapDatePickerConfigService.getDaterangepickerConfig,
        },
        {
            provide: BsLocaleService,
            useFactory: NgxBootstrapDatePickerConfigService.getDatepickerLocale,
        }
    ]
})
export class SalaryModule { }
